package com.jxcq.tensquare.spit;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author CalvinXCui
 * @date 2019- 10- 15 12:26
 */
@Slf4j
@SpringBootApplication
@EnableEurekaClient
public class SpitApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpitApplication.class, args);
        log.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+"spit服务启动完成并成功!!!!!!!!");
    }

    @Bean
    public IdWorker idWorkker(){
        return new IdWorker(1, 1);
    }
}
